package org.ghl.string;

import java.util.Scanner;

public class StringTest {


    public static void main(String[] args) {
        String userName;
        String userPasword;
        Scanner scan = new Scanner(System.in);
        System.out.println("简易登录测试");
        System.out.println("请输入账号");
        userName = scan.nextLine();
        int isUserName = 0;
        while (userName.length() != 6){

            System.out.println("用户名不存在,重新输入");
            userName = scan.nextLine();
        } {
            System.out.println("欢迎" + userName);
        }
        System.out.println("请输入密码");
        userPasword = scan.nextLine();
        while (!"123456".equals(userPasword)) {
           System.out.println("密码不正确，请重新输入");
            userPasword = scan.nextLine();
        }
            System.out.print("登录成功");




    }
}
